package com.cskaoyan.controller.wxcontroller;

import com.cskaoyan.bean.po.MarketFootprint;
import com.cskaoyan.bean.common.BasePageInfo;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.wxservice.FootprintWxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:J
 * @datetime 2023/1/2 6:17
 * @description: TODO:
 */


@RestController
@RequestMapping("wx/footprint")
public class FootprintWeChatController {

    @Autowired
    FootprintWxService footprintWxService;


    /**
     * http://182.92.235.201:8083/wx/footprint/list?page=1&limit=10
     * @return
     */
    @RequestMapping("list")
    public BaseRespVo list(BasePageInfo info){
        CommonData<MarketFootprint> data=footprintWxService.list(info);
        return BaseRespVo.okYa(data);
    }

    @RequestMapping("delete")
    public BaseRespVo delete(@RequestBody MarketFootprint marketFootprint){
        footprintWxService.delete(marketFootprint);
        return BaseRespVo.ok();
    }
}
